#ifndef __DMAT3_H__
#define __DMAT3_H__

#include "dvec3.h"

namespace libvec
{
  struct mat3;

  struct dmat3
  {
    dvec3 v1, v2, v3;

    dmat3();
    dmat3(mat3 m);
    dmat3(double value);
    dmat3(double n11, double n12, double n13,
        double n21, double n22, double n23,
        double n31, double n32, double n33);
    dmat3(dvec3 u, dvec3 v, dvec3 w);

    dvec3 &operator[](int index);

    dmat3 operator=(dmat3 m);

    bool operator==(dmat3 m);
    bool operator!=(dmat3 m);

    dmat3 &operator+();
    dmat3 &operator-();

    dmat3 operator+(dmat3 m);
    dmat3 operator+=(dmat3 m);
    dmat3 operator-(dmat3 m);
    dmat3 operator-=(dmat3 m);
    dvec3 operator*(dvec3 v);
    dmat3 operator*(dmat3 m);
    dmat3 operator*=(dmat3 m);
    dmat3 operator*(double scale);
    dmat3 operator*=(double scale);
    dmat3 operator/(double scale);
    dmat3 operator/=(double scale);
  };
}

#endif /* __DMAT3_H__ */
